﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Canteen.Core.Models
{
    //充值记录
    public class RechargeRecord : BaseEntity
    {
        [ForeignKey("UserId")]
        public int UserId { get; set; }//User外键
        public virtual User User { get; set; }//User导航属性

        //充值编号
        [MaxLength(32), Required]
        [Column(TypeName = "VARCHAR(20)")]
        public string RechargeNo { get; set; }

        //充值方式
        [MaxLength(16)]
        public string Mode { get; set; }
        [Column(TypeName = "MONEY")]
        public decimal Price { get; set; }//单价
    }
}
